//
//  BandCardCodeTableViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/7/18.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "BandCardCodeTableViewCell.h"

@implementation BandCardCodeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
    }
    return self;
}

-(void)creatUI{
    [self.contentView addSubview:self.codeLabel];
    [self.contentView addSubview:self.textfiled];
    [self.contentView addSubview:self.btn];
}

-(UILabel *)codeLabel
{
    if (_codeLabel == nil) {
        _codeLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 15, 110, 25)];
        _codeLabel.font = font(16);
        _codeLabel.textColor = SFM51;
        _codeLabel.textAlignment = NSTextAlignmentLeft;
        _codeLabel.text = @"验证码";
    }
    return _codeLabel;
}

-(UITextField *)textfiled
{
    if (_textfiled == nil) {
        _textfiled = [[UITextField alloc] initWithFrame:CGRectMake(140, 15, WIDTH - 250, 25)];
        _textfiled.font = font(16);
        _textfiled.textColor = SFM153;
        _textfiled.placeholder = @"请输入验证码";
    }
    return _textfiled;
}

-(UIButton *)btn
{
    if (_btn == nil) {
        _btn = [[UIButton alloc] initWithFrame:CGRectMake(WIDTH - 110, 15, 70, 25)];
        [_btn setTitle:@"获取" forState:UIControlStateNormal];
        _btn.backgroundColor = SFMNavBarColor;
        _btn.titleLabel.font = font(12);
        _btn.layer.cornerRadius = 12.5;
    }
    return _btn;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
